package pers.cz.node;

import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.remote.RemoteWebDriver;
import pers.cz.mxgraph.MxCell;
import pers.cz.selenium.component.TextBoxComponent;

import java.util.HashMap;
import java.util.Map;

/**
 * @program: Reids
 * @description: 文本节点
 * @author: Cheng Zhi
 * @create: 2023-01-13 16:08
 **/
public class TextNode extends AbstractNode {

    public TextNode(MxCell mxCell) {
        super(mxCell);
    }

    @Override
    public void runNode(NodeCallBack callBack) throws Exception {
        RemoteWebDriver driver = getDriver();
        TextBoxComponent textBoxComponent = new TextBoxComponent(mxCell.getMxObjectData().get("fullPath"),driver);
        textBoxComponent.setValue(mxCell.getMxObjectData().get("context"));
    }

    @Override
    public void verify() {

    }

    @Override
    public String getName() {
        return mxCell.getName();
    }
}
